<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" href="PythonCard.css"  type="text/css"/>
    <meta name="author" content="Kevin Altis" />
    <title>Installing PythonCard on Mac OS X (Jaguar)</title>
  </head>
  <body>
    <div id="banner">
    <h1>How to Install PythonCard on Mac OS X (Jaguar)</h1>
    </div>
    <?php include "sidebar.php" ?>
    <div id="content">
    <p><strong>The instructions below are for installing PythonCard on Mac OS 
    10.2 (Jaguar). If you are using Mac OS 10.3 (Panther), then please use 
    <a href="macosx_installation.html">these instructions</a> instead.</strong></p>
    <p>Installing PythonCard on your system requires the following steps:</p>
    <ol>
      <li>Download Python from the python.org site.</li>
      <li>Download wxPython from the wxPython.org site.</li>
      <li>Download PythonCard from the PythonCard site.</li>
      <li>Install Python</li>
      <li>Install wxPython</li>
      <li>Install PythonCard</li>
      <li>Confirm the installation works</li>
    </ol>
    <h2>Downloading Python</h2>
    <p>If you're running Jaguar then you already have Python 2.2 installed on 
    your system, but this isn't usable with wxPython, so you'll still need to 
    download a &quot;framework&quot; build of Python.</p>
    <p>Click on this <a href="http://ftp.cwi.nl/jack/python/mac/MacPython-OSX-2.3-1.dmg">MacPython-OSX-2.3-1.dmg</a> 
    link to begin the download. Most Mac OS X browsers will save the file to your
    desktop.</p>
    <h2>Downloading wxPython</h2>
    <p>PythonCard relies on the wxPython package. Click on this <a href="http://prdownloads.sourceforge.net/wxpython/wxPythonOSX-2.5.2.8-jaguar-Py2.3.dmg">wxPythonOSX-2.5.2.8-jaguar-Py2.3.dmg</a> 
    link to begin the download. Again, most Mac OS X browsers will save the file 
    to your desktop.</p>
    <h2>Downloading PythonCard</h2>
    <p>The latest version of PythonCard is always available via the 
    <a href="http://sourceforge.net/project/showfiles.php?group_id=19015">PythonCard download page</a>. 
    Click on this 
    <a href="http://prdownloads.sourceforge.net/pythoncard/PythonCard-0.8.2.tar.gz">PythonCard-0.8.2.tar.gz</a> 
    link to begin the download. Again, most Mac OS X browsers will save the file 
    to your desktop.</p>
    <h2>Installing Python</h2>
    <p>Python arrives at your system as an installable disk image. All you have 
    to do is double-click on the file you downloaded (it's called 
    MacPython-OSX-2.3-1.dmg), then double-click the MacPython-OSX.pkg icon and 
    follow the instructions in the installation wizard. The installer will create
    a new directory <span class="code">/Library/Frameworks/Python.framework/Versions/2.3/</span> 
    to contain the Python executables, documentation, tools, and standard 
    libraries.</p>
    <h2>Installing wxPython</h2>
    <p>wxPython also comes as an installable disk image. Just double-click on the
    file you downloaded (it's called wxPythonOSX-2.5.2.8-jaguar-Py2.3.dmg), then 
    double-click the wxPythonOSX-jaguar.pkg icon and follow the instructions. 
    wxPython will be installed into <span class="code">/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/</span>.</p>
    <p>I recommend creating a wxPython folder in your Applications folder and 
    copying the Apps, Docs, Samples, and README 1st.txt files to the wxPython 
    folder.</p>
    <h2>Installing PythonCard</h2>
    <p>The PythonCard-0.8.2.tar.gz file you downloaded should 
    automatically be decompressed by Stuffit; if the file isn't already 
    decompressed, then double-click the PythonCard-0.8.2.tar.gz file. 
    You should now have a PythonCard-0.8 directory on your desktop. 
    Open the Terminal application and do a cd to that directory and then run the 
    setup.py script using the 2.3 Python you just installed. The sudo command 
    will prompt you for your password.</p>
    <p class="code">[mymachine:~] bob% cd ~/Desktop/PythonCard-0.8<br />
    [mymachine:~/Desktop/PythonCard-0.8] bob% sudo /usr/local/bin/python setup.py install</p>
    <p>By default, the PythonCard framework will be installed into <span class="code">/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PythonCard</span>. 
    You'll probably want to make an alias to this directory to keep on your 
    desktop or home folder to make it easier to get to the PythonCard tools and 
    samples.</p>
    <h2>Confirming Installation</h2>
    <p>It is important that you use the right version of Python to run wxPython 
    and PythonCard scripts. Open the Terminal and then try running the Python 
    that you just installed. Type Ctrl+D to exit the Python interpreter.</p>
    <p class="code">[mymachine:~] bob% /usr/local/bin/pythonw<br />
    Python 2.3 (#2, Jul 30 2003, 11:45:28)<br />
    [GCC 3.1 20020420 (prerelease)] on darwin<br />
    Type "help", "copyright", "credits" or "license" for more information.<br />
    &gt;&gt;&gt; ^D</p>
    <p>Apple's Jaguar build of Python was not overwritten when you did the 
    installation and is still available as <span class="code">/usr/bin/python</span>. 
    Since by default your PATH environment variable does not contain the 
    <span class="code">/usr/local/bin</span> directory, you can still run Apple's
    Python as shown below.</p>
    <p class="code">[mymachine:~] bob% python<br />
    Python 2.2 (#1, 07/14/02, 23:25:09)<br />
    [GCC Apple cpp-precomp 6.14] on darwin<br />
    Type "help", "copyright", "credits" or "license" for more information.<br />
    &gt;&gt;&gt; ^D<br />
    [mymachine:~] bob% which python<br />
    /usr/bin/python</p>
    <p>But again, remember that wxPython and PythonCard scripts will not work 
    with that version, so it is important when working in the Terminal to always 
    use <span class="code">/usr/local/bin/pythonw</span>.</p>
    <h3>Configuring PythonLauncher</h3>
    <p>The default install leaves .py and .pyw files associated with the Python 
    IDE rather than PythonLauncher which is the app used to run Python scripts 
    from the Finder.</p>
    <p>If you select a .py file you can choose Get Info from the File menu and 
    then change the files to open with PythonLauncher instead of the IDE if you 
    want to be able to double-click a file and have it run. Repeat the process 
    for .pyw files. Alternatively, you can hold down the control key and when you
    click on a .py file then you can select PythonLauncher from the Open With
    menu item.</p>
    <h3>Acid Test</h3>
    <p>OK, now comes the acid test. Open the folder called &quot;minimal&quot; in 
    <span class="code">/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PythonCard/samples</span>. 
    Find the icon labeled minimal.py and double-click it. In a few moments (after 
    an operating system console window has appeared), a small window like the one
    shown in Figure 1 will appear. This indicates that your installation was 
    successful and everything is working. Close the minimal application in the 
    usual way and proceed with the Walk-Through.</p>
    <p class="imageCaption"><img src="http://pythoncard.sourceforge.net/images/minimal_macosx.png" alt="Minimal sample on Mac OSX" /><br />
    Figure 1. PythonCard minimal application window open to confirm installation
    is correct</p>
    <p>If for some reason this test fails, go back over these instructions 
    carefully. In particular, make sure that wxPython and PythonCard 
    both appear in the site-packages folder in Python's Lib folder.</p>
    <p>If everything seems OK and you still can't get minimal.py to launch, post 
    a message to the PythonCard Users Mailing List. (If you aren't yet a member, 
    visit the <a href="http://lists.sourceforge.net/lists/listinfo/pythoncard-users">list management page</a>
    and join.)</p>
    <p><a href="walkthrough1.html">Back to Walk-Through</a></p>
    <?php include "footer.php" ?>
    <p>$Revision: 1.10 $ : $Author: alextweedly $ : Last updated $Date: 2006/04/06 11:00:25 $</p>
    </div> <!-- end of content -->
  </body>
</html>
